export default {
  'el-radio': {
    render: (h, item, self) => {
      return item.options.map(option => {
        const props = {
          domProps: {
            value: self.formDataMap[item.key] || ''
          },
          props: {
            ...option,
            value: self.formDataMap[item.key] || ''
          },
          on: {
            input: val => {
              self.formDataMap[item.key] = val
            }
          }
        }
        return (<el-radio class="radio" {...props}>{option.text}</el-radio>)
      })
    }
  }
}
